<HTML>
<HEAD>
<TITLE> MKSPK User's Guide </TITLE>
</HEAD>

<BODY style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">

<A NAME="top"></A>

<TABLE STYLE="text-align: left; margin-left: auto; margin-right: auto; width: 800px;" BORDER="0" CELLPADDING="5" CELLSPACING="2">
<TBODY>
<TR>
  <TD STYLE="background-color: rgb(153, 153, 153); vertical-align: middle; text-align: center;">
  <DIV ALIGN="right">
    <SMALL><SMALL><A HREF="index.html">Index Page</A></SMALL></SMALL>
  </DIV>
  <B>MKSPK User's Guide</B> </TD>
</TR>
<TR>
  <TD STYLE="vertical-align: top;">

<H2> Table of Contents
</H2>

<PRE>
   <A HREF="#MKSPK User's Guide">MKSPK User's Guide</A>
      <A HREF="#Abstract">Abstract</A>
      <A HREF="#Summary">Summary</A>
      <A HREF="#Usage">Usage</A>
      <A HREF="#Execution of MKSPK">Execution of MKSPK</A>
      <A HREF="#Setup File Format and Contents">Setup File Format and Contents</A>
         <A HREF="#Required Assignments">Required Assignments</A>
         <A HREF="#Conditional Assignments">Conditional Assignments</A>
         <A HREF="#Optional Assignments">Optional Assignments</A>
      <A HREF="#Detailed Description of Setup File Keywords">Detailed Description of Setup File Keywords</A>
      <A HREF="#Description of Input Data Format">Description of Input Data Format</A>
      <A HREF="#Description of Input Data Parameters">Description of Input Data Parameters</A>
      <A HREF="#Description of Input Data Types and Content">Description of Input Data Types and Content</A>
         <A HREF="#Input Type STATES">Input Type STATES</A>
         <A HREF="#Input Type ELEMENTS">Input Type ELEMENTS</A>
         <A HREF="#Input Type EQ_ELEMENTS">Input Type EQ_ELEMENTS</A>
         <A HREF="#Input Type TL_ELEMENTS">Input Type TL_ELEMENTS</A>
      <A HREF="#Relation Between Number of Input Records and Output Types">Relation Between Number of Input Records and Output Types</A>
      <A HREF="#Examples of Input Data and Setup Files">Examples of Input Data and Setup Files</A>
         <A HREF="#Data Order and Data Delimiters">Data Order and Data Delimiters</A>
         <A HREF="#Example 1">Example 1</A>
         <A HREF="#Example 2">Example 2</A>
         <A HREF="#Example 3">Example 3</A>
         <A HREF="#Example 4">Example 4</A>
      <A HREF="#Using Time Wrappers">Using Time Wrappers</A>
      <A HREF="#Complete Examples">Complete Examples</A>
         <A HREF="#Input Data Type STATES / Output SPK Type 05">Input Data Type STATES / Output SPK Type 05</A>
         <A HREF="#Input Data Type STATES / Output SPK Type 08">Input Data Type STATES / Output SPK Type 08</A>
         <A HREF="#Input Data Type STATES / Output SPK Type 09">Input Data Type STATES / Output SPK Type 09</A>
         <A HREF="#Input Data Type STATES / Output SPK Type 12">Input Data Type STATES / Output SPK Type 12</A>
         <A HREF="#Input Data Type STATES / Output SPK Type 13">Input Data Type STATES / Output SPK Type 13</A>
         <A HREF="#Input Data Type STATES / Output SPK Type 15">Input Data Type STATES / Output SPK Type 15</A>
         <A HREF="#Input Data Type STATES / Output SPK Type 17">Input Data Type STATES / Output SPK Type 17</A>
         <A HREF="#Input Data Type ELEMENTS / Output SPK Type 05">Input Data Type ELEMENTS / Output SPK Type 05</A>
         <A HREF="#Input Data Type ELEMENTS / Output SPK Type 08">Input Data Type ELEMENTS / Output SPK Type 08</A>
         <A HREF="#Input Data Type ELEMENTS / Output SPK Type 09">Input Data Type ELEMENTS / Output SPK Type 09</A>
         <A HREF="#Input Data Type ELEMENTS / Output SPK Type 12">Input Data Type ELEMENTS / Output SPK Type 12</A>
         <A HREF="#Input Data Type ELEMENTS / Output SPK Type 13">Input Data Type ELEMENTS / Output SPK Type 13</A>
         <A HREF="#Input Data Type ELEMENTS / Output SPK Type 15">Input Data Type ELEMENTS / Output SPK Type 15</A>
         <A HREF="#Input Data Type ELEMENTS / Output SPK Type 17">Input Data Type ELEMENTS / Output SPK Type 17</A>
         <A HREF="#Input Data Type EQ_ELEMENTS / Output SPK Type 17">Input Data Type EQ_ELEMENTS / Output SPK Type 17</A>
         <A HREF="#Input Data Type TL_ELEMENTS / Output SPK Type 10">Input Data Type TL_ELEMENTS / Output SPK Type 10</A>
         <A HREF="#Skipping Input Data Record Tokens">Skipping Input Data Record Tokens</A>
         <A HREF="#Two Epochs in the Input Data Records">Two Epochs in the Input Data Records</A>

</PRE>

<HR SIZE=3 NOSHADE>

<BR><BR>
<A NAME="MKSPK User's Guide"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H1> MKSPK User's Guide
</H1><HR SIZE=3 NOSHADE><P><BR><BR><BR>
   Last revised on 2010 JUN 03 by B. V. Semenov.
<P>
 
<BR><BR>
<A NAME="Abstract"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Abstract
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   MKSPK is a program that creates an SPK file from a text file containing
   trajectory information.
<P>
 
<BR><BR>
<A NAME="Summary"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Summary
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   MKSPK is a NAIF Toolkit utility program that generates a new, or appends
   data to an existing, spacecraft or target body's ephemeris file in SPICE
   SPK format using one of the following SPK types: 5, 8, 9, 10, 12, 13,
   15, 17. This SPK file is a binary file constructed according to the
   SPICE DAF (Double Precision Array File) architecture, containing one or
   more SPK data segments.
<P>
 
   The MKSPK program accepts one ASCII text file containing descriptions of
   input data (setup file) and a second ASCII text file (input file)
   containing the source ephemeris data to be processed.
<P>
 
   Source ephemeris data can be time ordered lists of states (positions and
   velocities), sets of conic elements, sets of two-line elements, or a
   single set of equinoctial elements. All input data must be defined in a
   reference frame and relative to a body center both of which are
   specified in the setup file.
<P>
 
   The program allows the user to optionally specify some descriptive text
   in a separate file (comment file) to be placed into the ``comment area''
   of the SPK ephemeris file. (Doing this is highly recommended.)
<P>
 
   For archival documentation purposes the content of the MKSPK setup file
   is automatically placed at the end of the ``comment area'' of the SPK
   file.
<P>
 
<BR><BR>
<A NAME="Usage"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Usage
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   Program usage:
<P>
 
<PRE>
      &gt; mkspk [-setup &lt;setup file name&gt;]
              [-input &lt;input data file name&gt;]
              [-output &lt;output SPK file name&gt;]
              [-append]
              [-u|-usage]
              [-h|-help]
              [-t|-template] [&lt;input data type&gt; &lt;output spk type&gt;]
</PRE>
   If a setup file name isn't provided on the command line, the program
   will prompt for it. It will not prompt for the input or output file
   names -- these must be provided on the command line or in the setup
   file. If input and output file names are provided on the command line,
   any file names assigned using setup keywords are ignored.
<P>
 
   The input file must already exist.
<P>
 
   If the -append key or the corresponding setup file keyword is not
   specified, the output file must not exist prior to running the program.
<P>
 
   If the -append key or the corresponding setup file keyword is provided
   and the SPK file specified after the -output key exists, then new data
   will be appended to it.
<P>
 
   If the -append key or the corresponding setup file keyword is provided
   but the SPK file specified after the -output key doesn't exist, then a
   new SPK file with the name specified after -output key will be created.
<P>
 
   Caution: if the program fails for any reason, it, in most cases, deletes
   the output file, even if it was appending data to an existing SPK file.
   Therefore, users should always make a backup copy of an SPK file to
   which new data is going to be appended before running the program in
   append mode.
<P>
 
   Also, the program cannot append data to an existing SPK file if its
   format is not native to the platform on which the program is running.
   Refer to the CONVERT User's Guide (<a href="../ug/convert.html">convert.ug</a>) for details.
<P>
 
<BR><BR>
<A NAME="Execution of MKSPK"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Execution of MKSPK
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   You will need a setup file to execute the MKSPK utility program. The
   format for the setup file is described below.
<P>
 
   As it executes, the program will display a brief summary of its action.
<P>
 
   Only one SPK ephemeris file using a single SPK type and containing one
   or more segments may be generated during a single MKSPK session.
<P>
 
<BR><BR>
<A NAME="Setup File Format and Contents"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Setup File Format and Contents
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   Other than the input and output file names, which may occur on the
   command line, the program requires all inputs such as object and body
   names or ID, frame name or ID, types of input and output data, list and
   order of input parameters, constants, etc. to be provided in a setup
   file. The format of this file must conform to the SPICE text kernel
   specification since the data from the setup file will be loaded into a
   kernel pool. This means that input values must be assigned to keyword
   variables using the format
<P>
 
<PRE>
      KEYWORD = VALUE
</PRE>
   Each assignment is restricted to a single line. Sets of these
   assignments must be enclosed between
<P>
 
<PRE>
      \begindata
      \begintext
</PRE>
   tokens, each of which must also be placed on a line by itself. Free-form
   descriptive/explanatory text may occur after the
<P>
 
<PRE>
      \begintext
</PRE>
   token. Still more assignments could follow another
<P>
 
<PRE>
      \begindata
</PRE>
   token.
<P>
 
   The names of the setup file keywords must be strictly uppercase while
   the standard value of keywords may be upper, lower or mixed case. Any
   white space preceding or following keyword names, values and equal sign
   is ignored.
<P>
 
   All character string values and time strings must be enclosed in single
   quotes, provided on a single line and be no longer than 80 characters.
   When multiple value are allowed and used, enclose the complete set in
   the "()" characters: KEYWORD = ( 'value1' 'value2' 'value3' ... )
<P>
 
   All assignments are either required, conditional or optional as
   described below.
<P>
 
   A setup file may contain blank lines. Non-printing characters including
   TAB should not be used in setup file lines containing keyword
   assignments or blank lines separating them within the data sections of a
   setup file. The program may not be able to parse correctly any of the
   setup file lines that contain non-printing characters and will signal a
   setup file parsing error on some computer platforms.
<P>
 
<BR><BR>
<A NAME="Required Assignments"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Required Assignments
</H3><P><BR><BR>
   The following assignments must be present in a setup file:
<P>
 
<PRE>
      INPUT_DATA_TYPE   = 'STATES' or 'ELEMENTS' or 'EQ_ELEMENTS'
                          or 'TL_ELEMENTS'
      OUTPUT_SPK_TYPE   = 5 or 8 or 9 or 10 or 12 or 13 or 15 or 17
 
      OBJECT_ID         = Numeric code assigned to the object, or
                          NORAD s/c code ('TL_ELEMENTS'/SPK 10 only)
        or
      OBJECT_NAME       = 'NAIF supported object name'
 
      CENTER_ID         = Numeric code assigned to the body which
                          is the center of the motion for the object
        or
      CENTER_NAME       = 'NAIF supported body name'
 
      REF_FRAME_NAME    = 'reference frame name'
      PRODUCER_ID       = 'producer identifier'
      DATA_ORDER        = 'ordered list of input parameter names'
      DATA_DELIMITER    = 'delimiter separating input data items'
      LEAPSECONDS_FILE  = 'leapseconds file name'
</PRE>
   The following assignments are required in the setup file if their values
   are not provided on the command line:
<P>
 
<PRE>
      INPUT_DATA_FILE   = 'input data file name'
      OUTPUT_SPK_FILE   = 'output SPK file name'
</PRE>
<BR><BR>
<A NAME="Conditional Assignments"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Conditional Assignments
</H3><P><BR><BR>
   One or more of the following assignments may be needed depending on the
   kind of input data being used and other conditions. See the definitions
   that follow for details.
<P>
 
<PRE>
      PCK_FILE          = ( 'PCK_1 file name'
                            'PCK_2 file name'
                              ...
                            'PCK_n file name' )
      FRAME_DEF_FILE    = 'frame definition file name'
      COMMENT_FILE      = 'comment file name'
      INPUT_DATA_UNITS  = ( 'ANGLES = angle unit'
                            'DISTANCES= distance unit' )
      EPOCH_STR_LENGTH  = length of epoch string
      IGNORE_FIRST_LINE = number of initial lines to be ignored while
                          reading input file
      LINES_PER_RECORD  = number of lines in one input record
      TIME_WRAPPER      = '# time wrapper'
      START_TIME        = 'start time'
      STOP_TIME         = 'stop time'
      PRECESSION_TYPE   = 'NO PRECESSION' or
                          'APSIDE PRECESSION ONLY' or
                          'NODE PRECESSION ONLY' or
                          'APSIDE AND NODE PRECESSION'
      POLYNOM_DEGREE    = polynomial degree of Lagrange or Hermite
                          interpolation
      CENTER_GM         = center GM value
      CENTER_POLE_RA    = the right ascension of the center's north
                          pole given with respect to the reference
                          frame
      CENTER_POLE_DEC   = the declination of the center's north pole
                          given with respect to the reference frame
      CENTER_J2         = center's J2 value
      CENTER_EQ_RADIUS  = center's equatorial radius
</PRE>
<BR><BR>
<A NAME="Optional Assignments"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Optional Assignments
</H3><P><BR><BR>
<PRE>
      SEGMENT_ID        = 'segment identifier'
      APPEND_TO_OUTPUT  = flag indicating whether new segments should
                          or shouldn't be appended to an existing SPK
                          file
</PRE>
<BR><BR>
<A NAME="Detailed Description of Setup File Keywords"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Detailed Description of Setup File Keywords
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
<DL><DT>
<B>
 INPUT_DATA_TYPE
</B><BR><BR>
<DD>
 type of input data. Only one of four allowed values may be used as
shown above.<BR>
</DL>
<DL><DT>
<B>
 OUTPUT_SPK_TYPE
</B><BR><BR>
<DD>
 type of output SPK file. Only one of eight allowed values may be used
as shown above.<BR>
</DL>
<DL><DT>
<B>
 OBJECT_ID
</B><BR><BR>
<DD>
 object identifier.<BR>
</DL>
<DL><DT>
<DD>
 For all input data type/output SPK type combinations except
'TL_ELEMENTS'/SPK 10 (called 'TL_ELEMENTS'/SPK 10 case elsewhere in the
text) this is ideally a NAIF reserved code of the object (which for
spacecraft or other vehicles must be a negative number); if this
keyword is absent the OBJECT_NAME keyword must be used.<BR>
</DL>
<DL><DT>
<DD>
 If NAIF has not assigned an ID code (based on DSN/GSFC assignments) the
user may select a temporary ID, avoiding the range of -0 through -512.
(It might be useful to contact NAIF for assignment of a temporary
code.)<BR>
</DL>
<DL><DT>
<DD>
 For 'TL_ELEMENTS'/SPK 10 case this is the NORAD spacecraft code.
Because the NAIF ID for a spacecraft must be a negative number while
the NORAD ID is a positive number, the spacecraft ID that will appear
in the output SPK file is constructed from the NORAD ID using the
following rule:<BR>
</DL>
<PRE>
                                 NAIF_ID = -100000 - NORAD_ID
</PRE>
<DL><DT>
<B>
 OBJECT_NAME
</B><BR><BR>
<DD>
 name of the object. This is one of the NAIF supported names for the
object. This keyword is required if the OBJECT_ID keyword is absent. If
both keywords are present, the MKSPK program uses the OBJECT_ID and
ignores this assignment.<BR>
</DL>
<DL><DT>
<B>
 CENTER_ID
</B><BR><BR>
<DD>
 center identifier. This is the NAIF reserved code of the center of
motion for the object. If this keyword is absent, the CENTER_NAME
keyword must be used. For the 'TL_ELEMENTS'/SPK 10 case this keyword
must have the value 399 (NAIF ID for Earth mass center.)<BR>
</DL>
<DL><DT>
<B>
 CENTER_NAME
</B><BR><BR>
<DD>
 name of the center. This is one if the NAIF supported names for the
center of motion. This keyword is required if the CENTER_ID keyword is
absent. If both keywords are present the MKSPK program uses the
CENTER_ID and ignores this assignment. If this keyword is provided for
the 'TL_ELEMENTS'/SPK 10 case, it must have the value 'Earth'.<BR>
</DL>
<DL><DT>
<B>
 REF_FRAME_NAME
</B><BR><BR>
<DD>
 name of the reference frame. If this is not a standard frame supported
by NAIF, the definition for this frame must be present in a frame
definitions kernel file specified in the FRAME_DEF_FILE keyword. For
the 'TL_ELEMENTS'/SPK 10 case this keyword must have the value 'J2000'.<BR>
</DL>
<DL><DT>
<B>
 PRODUCER_ID
</B><BR><BR>
<DD>
 producer identifier. This is a name identifying the producer of this
SPK file. This value will appear in the comment area of the SPK.<BR>
</DL>
<DL><DT>
<B>
 DATA_ORDER
</B><BR><BR>
<DD>
 ordered list of input parameter names as they appear in the input data
records. The names are delimited with white space.<BR>
</DL>
<DL><DT>
<B>
 DATA_DELIMITER
</B><BR><BR>
<DD>
 delimiter used to separate data items. This is picked from the
following set: 'TAB' , 'EOL' , comma (',') , semicolon (';') or white
space (' '). Only one of these values can be used. If your data does
not use one of these delimiters the data must be modified before being
processed through MKSPK.<BR>
</DL>
<DL><DT>
<B>
 LEAPSECONDS_FILE
</B><BR><BR>
<DD>
 leapseconds file name. This is the SPICE LSK file name, including full
or relative path specification.<BR>
</DL>
<DL><DT>
<B>
 INPUT_DATA_FILE
</B><BR><BR>
<DD>
 input data file name. This keyword must be used if the input data file
name is not provided on the command line. Include path if needed.<BR>
</DL>
<DL><DT>
<B>
 OUTPUT_SPK_FILE
</B><BR><BR>
<DD>
 output data file name. This keyword must be used if the output SPK file
name is not provided on the command line. Include path if needed.<BR>
</DL>
<DL><DT>
<B>
 PCK_FILE
</B><BR><BR>
<DD>
 SPICE Planetary Constants file name. One or more files can be used.
This keyword may be absent in the case when you do not need PCK
constants or when these constants are defined with other setup
keywords. Include path(s) if needed. For the 'TL_ELEMENTS'/SPK 10 case
a PCK file containing Earth geophysical constants must be provided
using this keyword.<BR>
</DL>
<DL><DT>
<B>
 FRAME_DEF_FILE
</B><BR><BR>
<DD>
 frame definition file name. This keyword is required if the reference
frame specified in the REF_FRAME_NAME keyword is not one defined in
SPICE Toolkit Software. In this case the frame must be defined in a
frames definition kernel file. Include path if needed.<BR>
</DL>
<DL><DT>
<B>
 COMMENT_FILE
</B><BR><BR>
<DD>
 comment file name. This keyword is used if you want to include comments
provided in this file in the comment area of the SPK file. Include path
if needed.<BR>
</DL>
<DL><DT>
<B>
 INPUT_DATA_UNITS
</B><BR><BR>
<DD>
 angle and distance units. The values of this keyword define the units
used for angles and distances appearing in the input data if these are
not RADIANS or KM. All angle and distance units supported by SPICE may
be used. The value fields take the form of an assignment, such as
'ANGLES=DEGREES' and 'DISTANCES=NAUTICAL_MILES'. The complete list of
angle and distance units that are recognized by MKSPK is:<BR>
</DL>
<PRE>
                                 RADIANS
                                 DEGREES        ARCMINUTES
                                 ARCSECONDS     HOURANGLE
                                 MINUTEANGLE    SECONDANGLE
 
                                 METERS         KM
                                 CM             MM
                                 FEET           INCHES
                                 YARDS          STATUTE_MILES
                                 NAUTICAL_MILES AU
                                 PARSECS        LIGHTSECS
                                 LIGHTYEARS
</PRE>
<DL><DT>
<DD>
 Note that MKSPK assumes that the time units of any input data
parameters or constants specified in the setup file are seconds.<BR>
</DL>
<DL><DT>
<B>
 EPOCH_STR_LENGTH
</B><BR><BR>
<DD>
 length (number of characters, including white space) of input data
record epoch strings, from the first through the last non blank
character. This length must be provided to the program in order to
enable parsing of the input data records containing two epoch strings
and using data delimiter characters which are also allowed in SPICE
time strings -- white space (' ') or comma (',').<BR>
</DL>
<DL><DT>
<B>
 IGNORE_FIRST_LINE
</B><BR><BR>
<DD>
 number of lines to be ignored at the beginning of the input file. If
this keyword is absent, the program starts data processing from the
first line of the input file.<BR>
</DL>
<DL><DT>
<B>
 LINES_PER_RECORD
</B><BR><BR>
<DD>
 number of lines in each input record. This keyword must be present if
EPOCH_STR_LENGTH is absent and the data delimiter is one also allowed
in SPICE time strings -- white space (' ') or comma (',').<BR>
</DL>
<DL><DT>
<B>
 TIME_WRAPPER
</B><BR><BR>
<DD>
 the specification of alphanumeric characters that are used to either
complete and/or further define the "EPOCH" strings (and the "EPOCHP"
string, if this is also used) provided in the input data and processed
by the program using the SPICE's time conversion routine STR2ET . Such
characters may be added at the front (prefix), the end (suffix), or
both of the epoch (and epochp, if used) data items. The location of the
epoch (and epochp) data relative to prefix or suffix characters is
specified with the<BR>
</DL>
<PRE>
                                 "#"
</PRE>
<DL><DT>
<DD>
 character. As example,<BR>
</DL>
<PRE>
                                 TIME_WRAPPER = '# TDT'
</PRE>
<DL><DT>
<DD>
 would add the characters ' TDT' to the end of every epoch value (and to
the epochp value, if present).<BR>
</DL>
<DL><DT>
<DD>
 If the "EPOCH" (and "EPOCHP") time tags are provided as ET seconds past
J2000 this keyword must be set to the following special value:<BR>
</DL>
<PRE>
                                 TIME_WRAPPER = '# ETSECONDS'
</PRE>
<DL><DT>
<DD>
 See "Using Time Wrappers" later in this document for more details.<BR>
</DL>
<DL><DT>
<B>
 START_TIME
</B><BR><BR>
<DD>
 start time. This keyword defines the first valid epoch of the output
SPK file. This value is always required for output SPK Types 15 and 17.
If this value is absent for other output types, the MKSPK program
calculates it using input data. This keyword does not apply when making
'TL_ELEMENTS'/SPK 10 SPK files. For these files the output SPK coverage
start time is automatically set to be 12 hours before the time of the
first input two-line elements set.<BR>
</DL>
<DL><DT>
<B>
 STOP_TIME
</B><BR><BR>
<DD>
 stop time. This keyword defines the last valid epoch of the output SPK
file. This value is always required for output SPK Types 15 and 17. If
this value is absent for other output types, the MKSPK program
calculates it using input data. This keyword does not apply when making
'TL_ELEMENTS'/SPK 10 SPK files. For these files the output SPK coverage
stop time is automatically set to be 12 hours after the time of the
last input two-line elements set.<BR>
</DL>
<DL><DT>
<B>
 PRECESSION_TYPE
</B><BR><BR>
<DD>
 J2 processing flag for output type 15. Only one of four values may be
specified using this keyword: 'NO PRECESSION', 'APSIDE PRECESSION
ONLY', 'NODE PRECESSION ONLY', 'APSIDE AND NODE PRECESSION'<BR>
</DL>
<DL><DT>
<B>
 POLYNOM_DEGREE
</B><BR><BR>
<DD>
 polynomial degree of Lagrange interpolation for output SPK Type 8 or 9,
or polynomial degree of Hermite interpolation for output SPK type 12 or
13. The polynomial degree of Hermite interpolation must be an odd
number. Also, to ensure continuity of the polynomials over the time
span covered by an SPK segment the degree for SPK types 8 and 9 should
be odd while the degree for SPK types 12 and 13 should be equivalent to
3 mod 4 (3, 7, 11, etc.)<BR>
</DL>
<DL><DT>
<B>
 CENTER_GM
</B><BR><BR>
<DD>
 center GM. This keyword specifies the GM of the central body. If it is
absent, the MKSPK program attempts to find this value in a PCK file.
You do not need this keyword when input type is STATE and output type
is 8, 9, 12 or 13 and when input type is EQ_ELEMENTS and output type is
17.<BR>
</DL>
<DL><DT>
<B>
 CENTER_POLE_RA
</B><BR><BR>
<DD>
 the right ascension of the central body's north pole. This keyword is
used for output types 15 and 17. If it is absent, the MKSPK program
attempts to compute this value using loaded PCK constants. The value
must in units specified in the keyword INPUT_DATA_UNITS and with
respect to the frame specified in the keyword REF_FRAME_NAME.<BR>
</DL>
<DL><DT>
<B>
 CENTER_POLE_DEC
</B><BR><BR>
<DD>
 the declination of the central body's north pole. This keyword is used
for output types 15 and 17. If it is absent, the MKSPK program attempts
to compute this value using loaded PCK constants. The value must in
units specified in the keyword INPUT_DATA_UNITS and with respect to the
frame specified in the keyword REF_FRAME_NAME.<BR>
</DL>
<DL><DT>
<B>
 CENTER_J2
</B><BR><BR>
<DD>
 central body's J2 coefficient. This keyword is needed only for output
type 15. If it is absent, the MKSPK program attempts to find its value
in a PCK file.<BR>
</DL>
<DL><DT>
<B>
 CENTER_EQ_RADIUS
</B><BR><BR>
<DD>
 equatorial radius of central body. This keyword is needed only for
output type 15. If it is absent, the MKSPK program attempts to find its
value in a PCK file.<BR>
</DL>
<DL><DT>
<B>
 SEGMENT_ID
</B><BR><BR>
<DD>
 segment identifier. The value assigned to this keyword can be up to 40
characters long. If this keyword is absent, the MKSPK program will use
the first 40 characters on the INPUT_FILE_NAME value as the segment
identifier.<BR>
</DL>
<DL><DT>
<B>
 APPEND_TO_OUTPUT
</B><BR><BR>
<DD>
 optional flag specifying whether it's permitted to append new segments
to an existing SPK file. This keyword can have one of these two values:
'YES' if segments can be appended and 'NO' if appending segments is not
permitted. If this keyword is not present, the program assumes the
value 'NO'. An -append flag specified on the command line overrides
either value of this keyword.<BR>
</DL>
<BR><BR>
<A NAME="Description of Input Data Format"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Description of Input Data Format
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   MKSPK requires the input data file to be an ASCII text file containing
   states, conic elements or equinoctial elements, or Space Command
   two-line elements. Any two-line elements file has fixed format and is
   processed as a special case; an input file containing any other type of
   input data must comply with the rules described in this section and the
   section immediately following it.
<P>
 
   All lines in the input file, including the last line, must be terminated
   with the line terminators native to the computer platform on which the
   program is run. If the lines are terminated with a non-native
   terminator, the program will not be able to process the input file
   correctly. If the last line of the input file is not terminated with the
   proper line terminator, the program will ignore it causing the data
   written to the output SPK file be incomplete.
<P>
 
   The input file must contain a number of data records sufficient to
   generate an SPK file of a specified type (see subsection below). Each of
   the records must occupy the same number of non-blank lines and contain
   the same set of input data items, provided in the same order. Blank
   lines can appear anywhere between non-blank record lines and are not
   taken into account by the program.
<P>
 
   The data set contained in each record must correspond to a single epoch.
   Data records in an input file must be provided in strictly increasing
   time order based on the values of the data item EPOCH. Data records with
   duplicate EPOCHs are not allowed.
<P>
 
   An input file may also contain one or more initial lines that do not
   represent a valid data record (for example a table header). These lines
   can be ignored by specifying their count in the IGNORE_FIRST_LINE setup
   file keyword.
<P>
 
   The order of the data items in each input data record must be specified
   in the DATA_ORDER keyword.
<P>
 
   Input data items within each data record must be separated by one of the
   following delimiters:
<P>
 
<PRE>
      'TAB' or  'EOL' or  ';' or  ','  or  ' '
</PRE>
   The delimiter is not required but is permitted after the last data item
   on a line. Any spaces between the delimiter and preceding or following
   data items are ignored. In the case when white space is used as the
   delimiter, multiple spaces between data items are treated as a single
   space.
<P>
 
   If tabulation ('TAB'), end-of-line ('EOL') or semicolon (';') is used as
   the data delimiter then only two setup file keywords are required for
   MKSPK in order to parse input data -- DATA_ORDER and DATA_DELIMITER.
<P>
 
   If comma (',') or white space (' '), which are also allowed in SPICE
   time strings, is used as the data delimiter and the input data records
   contain only one time parameter (EPOCH), then the number of lines in
   each input data record must be specified using the setup file keyword
   LINES_PER_RECORD. The DATA_ORDER and DATA_DELIMITER keywords must also
   be used.
<P>
 
   If comma (',') or white space (' ') is used as the data delimiter and
   the input data records contain two times (EPOCH and EPOCHP), then both
   input times must have the same width, from the first though the last
   non-blank character, and this width must be specified in the setup file
   keyword EPOCH_STR_LENGTH. The DATA_ORDER and DATA_DELIMITER keywords
   must also be used.
<P>
 
<BR><BR>
<A NAME="Description of Input Data Parameters"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Description of Input Data Parameters
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   The MKSPK program gains considerable flexibility by accepting several
   forms of ephemeris information and epochs. Further flexibility is
   achieved by allowing the user to tell MKSPK how those input data are
   organized, and, by allowing the user to clearly identify the time system
   and format used for time tags (epochs).
<P>
 
   Listed below are the names of all the input data known to MKSPK--you
   would use just a subset of these in any one MKSPK session. How you use
   these parameter names to tell MKSPK what kind of input data are to be
   processed is described below. Note that one parameter name, "SKIP", is
   used to indicate that some item(s) in your input data file are to be
   ignored by MKSPK.
<P>
 
<DL><DT>
<B>
 EPOCH
</B><BR><BR>
<DD>
 epoch of the data, given in any time format allowed by the SPICE's time
conversion routine STR2ET (for details, see section ``STR2ET'' of the
Time Required Reading document, <a href="../req/time.html">time.req</a>) or as a DP number
representing ET seconds past J2000. Note that the setup file keyword
TIME_WRAPPER, which is optionally used to modify input times processed
by STR2ET, must be set to the value<BR>
</DL>
<PRE>
                      '# ETSECONDS'
</PRE>
<DL><DT>
<DD>
 to process times given as ET seconds past J2000. This keyword is
described below in the section ``Using Time Wrappers.''<BR>
</DL>
<DL><DT>
<B>
 X
</B><BR><BR>
<DD>
 X position coordinate of state vector<BR>
</DL>
<DL><DT>
<B>
 Y
</B><BR><BR>
<DD>
 Y position coordinate of state vector<BR>
</DL>
<DL><DT>
<B>
 Z
</B><BR><BR>
<DD>
 Z position coordinate of state vector<BR>
</DL>
<DL><DT>
<B>
 VX
</B><BR><BR>
<DD>
 X velocity coordinate of state vector<BR>
</DL>
<DL><DT>
<B>
 VY
</B><BR><BR>
<DD>
 Y velocity coordinate of state vector<BR>
</DL>
<DL><DT>
<B>
 VZ
</B><BR><BR>
<DD>
 Z velocity coordinate of state vector<BR>
</DL>
<DL><DT>
<B>
 A
</B><BR><BR>
<DD>
 semi-major axis<BR>
</DL>
<DL><DT>
<B>
 E
</B><BR><BR>
<DD>
 eccentricity<BR>
</DL>
<DL><DT>
<B>
 RP
</B><BR><BR>
<DD>
 radius of periapsis<BR>
</DL>
<DL><DT>
<B>
 T
</B><BR><BR>
<DD>
 orbital period<BR>
</DL>
<DL><DT>
<B>
 P
</B><BR><BR>
<DD>
 semi-latus rectum<BR>
</DL>
<DL><DT>
<B>
 INC
</B><BR><BR>
<DD>
 inclination<BR>
</DL>
<DL><DT>
<B>
 PER
</B><BR><BR>
<DD>
 argument of periapsis<BR>
</DL>
<DL><DT>
<B>
 NOD
</B><BR><BR>
<DD>
 longitude of ascending node<BR>
</DL>
<DL><DT>
<B>
 MEAN
</B><BR><BR>
<DD>
 mean anomaly<BR>
</DL>
<DL><DT>
<B>
 EXAN
</B><BR><BR>
<DD>
 eccentric anomaly<BR>
</DL>
<DL><DT>
<B>
 TRAN
</B><BR><BR>
<DD>
 true anomaly<BR>
</DL>
<DL><DT>
<B>
 EPOCHP
</B><BR><BR>
<DD>
 epoch of periapsis, given in any time format allowed by the SPICE's
time conversion routine STR2ET (for details, see section ``STR2ET'' of
the Time Required Reading document, <a href="../req/time.html">time.req</a>) or as a DP number
representing ET seconds past J2000. Note that the setup file keyword
TIME_WRAPPER, which is optionally be used to modify input periapsis
times processed by STR2ET, must be set to the value<BR>
</DL>
<PRE>
                      '# ETSECONDS'
</PRE>
<DL><DT>
<DD>
 to process times given as ET seconds past J2000. This keyword is
described below in the section ``Using Time Wrappers.''<BR>
</DL>
<DL><DT>
<B>
 TAU
</B><BR><BR>
<DD>
 time interval between EPOCH and periapsis (EPOCH-EPOCHP) in seconds<BR>
</DL>
<DL><DT>
<B>
 EQ_A
</B><BR><BR>
<DD>
 1-st equinoctial element. This is the semi-major axis of the orbit<BR>
</DL>
<DL><DT>
<B>
 EQ_H
</B><BR><BR>
<DD>
 2-nd equinoctial element. This is the value of (E*SIN(PER+NOD)) at the
specified epoch.<BR>
</DL>
<DL><DT>
<B>
 EQ_K
</B><BR><BR>
<DD>
 3-rd equinoctial element. This is the value of (E*COS(PER+NOD)) at the
specified epoch<BR>
</DL>
<DL><DT>
<B>
 EQ_ML
</B><BR><BR>
<DD>
 4-th equinoctial element. This is the mean longitude (MEAN+PER+NOD) at
the specified epoch<BR>
</DL>
<DL><DT>
<B>
 EQ_P
</B><BR><BR>
<DD>
 5-th equinoctial element. This is the value of (TAN(INC/2)*SIN(NOD)) at
the specified epoch<BR>
</DL>
<DL><DT>
<B>
 EQ_Q
</B><BR><BR>
<DD>
 6-th equinoctial element. This is the value of (TAN(INC/2)*COS(NODE))
at the specified epoch<BR>
</DL>
<DL><DT>
<B>
 DPER/DT
</B><BR><BR>
<DD>
 7-th equinoctial element. This is the rate of the longitude of
periapsis (dPER/dt) at the specified epoch<BR>
</DL>
<DL><DT>
<B>
 DMPN/DT
</B><BR><BR>
<DD>
 8-th equinoctial element. This is the derivative of the mean longitude
(dM/dt + dPER/dt + dNOD/dt) at the specified epoch.<BR>
</DL>
<DL><DT>
<B>
 DNOD/DT
</B><BR><BR>
<DD>
 9-th equinoctial element. This is the rate of the longitude of the
ascending node (dNOD/dt) at the specified epoch<BR>
</DL>
<DL><DT>
<B>
 SKIP
</B><BR><BR>
<DD>
 input data record parameter to be ignored. This parameter is used to
identify the location in the input data records of any data items, or
parts of a data item if a complete data item includes the delimiter
within its value, that are not needed by MKSPK and therefore should be
ignored. This string may be used as many times as needed. Note that
sometimes more than one SKIP may be needed to ignore an additional time
tag in an input record if the delimiter is comma or white space.<BR>
</DL>
<BR><BR>
<A NAME="Description of Input Data Types and Content"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Description of Input Data Types and Content
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   Four types of input data can be processed by the program:
<P>
 
<PRE>
      STATES, ELEMENTS, EQ_ELEMENTS, TL_ELEMENTS
</PRE>
   If input type is STATES, you can create an SPK of output types: 5, 8, 9,
   12, 13, 15 and 17.
<P>
 
   If input type is ELEMENTS, you can create an SPK of output types: 5, 8,
   9, 12, 13, 15 and 17.
<P>
 
   If input type is EQ_ELEMENTS, you can create only an SPK of output type
   17.
<P>
 
   If input type is TL_ELEMENTS, you can create only an SPK of output type
   10.
<P>
 
<BR><BR>
<A NAME="Input Type STATES"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Type STATES
</H3><P><BR><BR>
   An input file of the STATES type must contain records consisting of
   EPOCH and a full set of state vector parameters X, Y, Z, VX, VY, Vz.
<P>
 
   If you use the STATES input type to produce an SPK of Type 17, you must
   also include three equinoctial parameters:
<P>
 
<PRE>
      DPER/DT, DMPN/DT, DNOD/DT
</PRE>
   in addition to the state vector.
<P>
 
<BR><BR>
<A NAME="Input Type ELEMENTS"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Type ELEMENTS
</H3><P><BR><BR>
   An input file of the ELEMENTS type must contain records consisting of
   EPOCH, E, INC, PER, NOD and one of A, RPI, T, P, as well as one of MEAN,
   EXAN, TRAN, EPOCHP, TAU.
<P>
 
   If you use the ELEMENTS input type to produce an SPK of Type 17, you
   must also include three equinoctial parameters:
<P>
 
<PRE>
      DPER/DT, DMPN/DT, DNOD/DT
</PRE>
   in addition to the state vector.
<P>
 
<BR><BR>
<A NAME="Input Type EQ_ELEMENTS"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Type EQ_ELEMENTS
</H3><P><BR><BR>
   An input file of the EQ_ELEMENTS type must contain EPOCH and nine
   equinoctial elements EQ_A, EQ_H, EQ_K, EQ_ML, EQ_P, EQ_Q, DPER/DT,
   DMPN/DT, DNOD/DT.
<P>
 
<BR><BR>
<A NAME="Input Type TL_ELEMENTS"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Type TL_ELEMENTS
</H3><P><BR><BR>
   An input file of the TL_ELEMENTS type has a pre-defined format and is
   processed by the program in a special way. Therefore, the program does
   not need specification of the record data order and ignores all setup
   file keywords describing input data format.
<P>
 
<BR><BR>
<A NAME="Relation Between Number of Input Records and Output Types"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Relation Between Number of Input Records and Output Types
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   An SPK of Type 5 requires one or more input records of time ordered
   STATES or ELEMENTS. If the input file contains only one record, the
   program can formally create an SPK of Type 5 but this file will not be
   useful for real applications.
<P>
 
   An SPK of Types 8, 9 requires input records of time ordered STATES or
   ELEMENTS. The degree of Lagrange polynomial specified by the keyword
   POLYNOM_DEGREE must be less than the number of the data records.
<P>
 
   An SPK of Type 10 requires one or more input records of time ordered
   TL_ELEMENTS for the spacecraft with the NORAD ID specified in the
   OBJECT_ID setup file keyword.
<P>
 
   An SPK of Types 12, 13 requires input records of time ordered STATES or
   ELEMENTS. The degree of Hermite polynomial specified by the keyword
   POLYNOM_DEGREE must be an odd number and less than the number of the
   data records times 2.
<P>
 
   An SPK of Type 15 requires only one input record of STATES or ELEMENTS.
   If the input file contains more than one record, only the first is used
   by the program.
<P>
 
   An SPK of Type 17 requires only one input record of EQ_ELEMENTS or one
   input record of STATES or ELEMENTS with DPER/DT, DMNP/DT, DNOD/DT added.
   If the input file contains more than one record, only the first is used
   by the program.
<P>
 
<BR><BR>
<A NAME="Examples of Input Data and Setup Files"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Examples of Input Data and Setup Files
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
<BR><BR>
<A NAME="Data Order and Data Delimiters"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Data Order and Data Delimiters
</H3><P><BR><BR>
   To use an input data file you must describe the order of data items in
   its data records and the delimiter used to separate these data items.
   You do this using appropriate keyword=value assignments in the setup
   file:
<P>
 
<PRE>
      DATA_ORDER     = '&lt;param1&gt; &lt;param2&gt; ... &lt;paramN&gt;'
      DATA_DELIMITER = '&lt;selection&gt;'
</PRE>
   In some situations it is necessary to use the keyword EPOCH_STR_LENGTH
   to define input epoch string length, or the keyword LINES_PER_RECORD to
   define the number of lines used for each input record. One of these
   assignments may be needed to allow MKSPK to determine which characters
   are part of the epoch parameter as opposed to being one of the state or
   elements parameters.
<P>
 
<BR><BR>
<A NAME="Example 1"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Example 1
</H3><P><BR><BR>
   The input type is STATES. We first consider the case when the delimiter
   separating data items is one of those also allowed as a delimiter in
   SPICE time strings.
<P>
 
   Case 1. ------
<P>
 
   It this example the data delimiter is the comma.
<P>
 
   You have a time ordered set of states with each record consisting of one
   line.
<P>
 
<PRE>
      epoch1, x1, y1, z1, vx1, vy1, vz1 [,]    (record 1)
      epoch2, x2, y2, z2, vx2, vy2, vz2 [,]    (record 2)
      epoch3, x3, y3, z3, vx3, vy3, vz3 [,]    (record 3)
      epoch4, x4, y4, z4, vx4, vy4, vz4 [,]    (record 4)
      .....................................    ..........
      .....................................    ..........
</PRE>
   Note that the data delimiter at the end of each line ( record ) is
   optional (as indicated by the square brackets) and may be omitted.
<P>
 
   Let the format of each epoch string be:
<P>
 
<PRE>
      1998 DEC 12 10:23:20
</PRE>
   You can define this input data using the following specifications in the
   setup file:
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'STATES'
      DATA_ORDER            = 'epoch x y z vx vy vz'
      DATA_DELIMITER        = ','
      EPOCH_STR_LENGTH      = 20
</PRE>
   Alternatively we can use this set of specifications:
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'STATES'
      DATA_ORDER            = 'epoch x y z vx vy vz '
      DATA_DELIMITER        = ','
      LINES_PER_RECORD      = 1
</PRE>
   This alternative method is possible because MKSPK is told that there are
   seven data items per line, of which the last six are the state.
   Therefore all other character strings are part of the epoch.
<P>
 
   Case 2. ------
<P>
 
   The epoch can occur in any position on the input line. For example, the
   input line could contain:
<P>
 
<PRE>
      x, y, z, epoch, vx, vy, vz [,]
</PRE>
   Relative to case 1 you need to change only the order of parameters in
   DATA_ORDER:
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'STATES'
      DATA_ORDER            = 'x y z epoch vx vy vz'
      DATA_DELIMITER        = ','
      EPOCH_STR_LENGTH      = 20
</PRE>
   or
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'STATES'
      DATA_ORDER            = 'x y z epoch vx vy vz'
      DATA_DELIMITER        = ','
      LINES_PER_RECORD      = 1
</PRE>
   Case 3. ------
<P>
 
   The input data use a blank (white space) as the delimiter. For example,
   the input line could contain:
<P>
 
<PRE>
      x y z epoch vx vy vz
</PRE>
   You need to change only the value of DATA_DELIMITER:
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'STATES'
      DATA_ORDER            = 'x y z epoch vx vy vz'
      DATA_DELIMITER        = ' '
      EPOCH_STR_LENGTH      = 20
</PRE>
   or
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'STATES'
      DATA_ORDER            = 'x y z epoch vx vy vz'
      DATA_DELIMITER        = ' '
      LINES_PER_RECORD      = 1
</PRE>
   If the delimiter used to separate input data items is one that is not
   allowed as a delimiter in SPICE time strings (white space or comma),
   then the specifications needed in the setup file are fewer -- neither
   EPOCH_STR_LENGTH nor LINE_PER_RECORD is needed.
<P>
 
   Case 4. ------
<P>
 
   The input data use one of 'TAB', 'EOL' or ';' as delimiter. For example,
   if an input line contains:
<P>
 
<PRE>
      x; y; z; epoch; vx; vy; vz [;]
</PRE>
   You should change the value of DATA_DELIMITER and omit the keyword
   EPOCH_STR_LENGTH or LINES_PER_RECORD:
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'STATES'
      DATA_ORDER            = 'x y z  epoch vx vy vz'
      DATA_DELIMITER        = ';'
</PRE>
<BR><BR>
<A NAME="Example 2"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Example 2
</H3><P><BR><BR>
   This is a more general example of input data.
<P>
 
   The input type is STATES and the delimiter is ',' which is also allowed
   in SPICE time strings.
<P>
 
   You have a time ordered set of states with epochs, and each input record
   consists of a few lines. There are some unused parameters ('not_used')
   between input data values and there are blank lines between significant
   lines. Each input record consists of 2 significant lines with none to
   several intervening blank lines:
<P>
 
<PRE>
      epoch1, not_used, not_used  [,]
      blank line
      x1, y1, z1, vx1, vy1, vz1   [,]        (record 1)
      epoch2, not_used, not_used  [,]
      x2, y2, z2, vx2, vy2, vz2   [,]        (record 2)
      epoch3,  not_used, not_used [,]
      x3, y3, z3, vx3, vy3, vz3   [,]        (record 3)
      epoch4,  not_used, not_used [,]
      blank line
      blank line
      x4, y4, z4, vx4, vy4, vz4   [,]        (record 4)
      ..............................       ..........
      ..............................       ..........
</PRE>
   The delimiter at the end of each line (record) is optional (as indicated
   by the square brackets) and may be omitted.
<P>
 
   Let the format of each epoch string look like this:
<P>
 
<PRE>
      1998 DEC 12 10:23:20.617
</PRE>
   You can define this input data using the following specification in the
   setup file:
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'STATES'
      DATA_ORDER            = 'epoch skip skip x y z vx vy vz'
      DATA_DELIMITER        = ','
      EPOCH_STR_LENGTH      = 24
</PRE>
   or
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'STATES'
      DATA_ORDER            = 'epoch skip skip x y z vx vy vz'
      DATA_DELIMITER        = ','
      LINES_PER_RECORD      = 2
</PRE>
   Note that the LINES_PER_RECORD assignment specifies the number of
   ``significant'' data lines per record -- it does not need to account for
   any number of intervening blank lines.
<P>
 
   All modifications like the cases of Example 1 are possible.
<P>
 
<BR><BR>
<A NAME="Example 3"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Example 3
</H3><P><BR><BR>
   Case 1: -------
<P>
 
   The input type is ELEMENTS. We consider the case when the data delimiter
   is one of those also allowed in SPICE time strings -- white space (' ')
   or comma (',').
<P>
 
   For example assume the delimiter is the comma character.
<P>
 
   You have a time ordered set of conic elements with epochs and each input
   record consists of a few lines. There are some unused parameters
   ('not_used') between input data values and occasionally some blank lines
   between significant lines. Each input record consists of 2 significant
   lines:
<P>
 
<PRE>
      epoch1, not_used, not_used     [,]
      blank line
      e1,a1,inc1, per1, nod1, mean1  [,]        (record 1)
      epoch2, not_used, not_used     [,]
      e2,a2,inc2, per2, nod2, mean2  [,]        (record 2)
      epoch3,  not_used, not_used    [,]
      e3,a3,inc3, per3, nod3, mean   [,]        (record 3)
      epoch4,  not_used, not_used    [,]
      blank line
      blank line
      e4,a4,inc4, per4, nod4, mean4  [,]        (record 4)
      ..............................            ..........
      ..............................            ..........
</PRE>
   The delimiter at the end of each line (record) is optional (as indicated
   by the square brackets) and may be omitted.
<P>
 
   Let the format of each epoch string look like this:
<P>
 
<PRE>
      1998 DEC 12 10:23:20.3
</PRE>
   You can define this input data using the following specification in the
   setup file:
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'ELEMENTS'
      DATA_ORDER            = 'epoch skip skip e a inc per nod mean'
      DATA_DELIMITER        = ','
      EPOCH_STR_LENGTH      = 22
</PRE>
   or
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'ELEMENTS'
      DATA_ORDER            = 'epoch skip skip e a inc per nod mean'
      DATA_DELIMITER        = ','
      LINES_PER_RECORD      = 2
</PRE>
   You could use, by the same rules, other elements included in the list of
   parameters for input type ELEMENTS, except the case when the existing
   epoch of periapsis is also included in the input data.
<P>
 
   Case 2: -------
<P>
 
   In this example you need epoch of periapsis as an additional input data
   item and the data delimiter is one of those also allowed in SPICE time
   strings -- white space (' ') or comma (','):
<P>
 
<PRE>
      epoch1, not_used, not_used        [,]
      blank line
      e1,a1,inc1, per1, nod1, epochp1   [,]        (record 1)
      epoch2, not_used, not_used        [,]
      e2,a2,inc2, per2, nod2, epochp2   [,]        (record 2)
      epoch3,  not_used, not_used       [,]
      e1,a1,inc1, per1, nod1, epochp3   [,]        (record 3)
      epoch4,  not_used, not_used       [,]
      blank line
      blank line
      e1,a1,inc1, per1, nod1, epochp4   [,]        (record 4)
      ..............................               ..........
      ..............................               ..........
</PRE>
   The value of epochp must use the same format as for the epoch string:
<P>
 
<PRE>
      1998 DEC 12 09:12:34.9
</PRE>
   and the length of the time string (must be the same for epoch and
   epochp) must be defined using the keyword EPOCH_STR_LENGTH:
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'ELEMENTS'
      DATA_ORDER            = 'epoch skip skip e a per nod epochp'
      DATA_DELIMITER        = ','
      EPOCH_STR_LENGTH      = 22
</PRE>
   All other modifications like the cases of Example 1 are possible.
<P>
 
<BR><BR>
<A NAME="Example 4"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Example 4
</H3><P><BR><BR>
   Input type is EQ_ELEMENTS. We consider the case when the delimiter is
   one of those also allowed in SPICE time strings -- white space (' ') or
   comma (',').
<P>
 
   For example assume the delimiter is the comma character.
<P>
 
   Each data record consists of two lines. There are some not used
   parameters ('not_used') between some of the input data values of nine
   equinoctial elements.
<P>
 
<PRE>
      epoch1, eq(1), eq(2), eq(3), eq(4), eq(5), eq(6) [,]
      not_used, not_used, eq(7), eq(8), eq(9), no_used [,]
</PRE>
   The delimiter at the end of each line (record) is optional (as indicated
   by the square brackets) and may be omitted.
<P>
 
   Let the format of each epoch string look like this:
<P>
 
<PRE>
      1998 DEC 12 10:23
</PRE>
   You can define this input data using the following specification in the
   setup file:
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'EQ_ELEMENTS'
      DATA_ORDER            = 'epoch eq_a eq_h eq_k eq_ml
         eq_p eq_q skip skip dper/dt dmnp/dt dnod/dt skip'  (*)
      DATA_DELIMITER        = ','
      EPOCH_STR_LENGTH      = 17
</PRE>
   or
<P>
 
<PRE>
      INPUT_DATA_TYPE       = 'EQ_ELEMENTS'
      DATA_ORDER            = 'epoch eq_a eq_h eq_k eq_ml
         eq_p eq_q skip skip dper/dt dmnp/dt dnod/dt skip' (*)
      DATA_DELIMITER        = ','
      LINES_PER_RECORD      = 2
</PRE>
   (*) In a real setup file the assignment for the DATA_ORDER keywords must
   be on a single line. It was split to be on two lines only to fit onto
   the page in this document.
<P>
 
<BR><BR>
<A NAME="Using Time Wrappers"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Using Time Wrappers
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   The TIME_WRAPPER keyword allows you to modify occurrences of time
   strings (either "epoch" or "epochp") in an input data file, either to
   add a time system identifier known to SPICE or some missing but fixed
   additional characters. The modifier alphanumeric characters are prefixed
   and/or suffixed around the given time string; enter the additional
   alphanumeric characters needed as the value for this keyword while using
   the
<P>
 
<PRE>
   "#"
</PRE>
   character to indicate where the given time string data are to be placed
   relative to the characters being added.
<P>
 
   As an example of providing a time string identifier, suppose the input
   data has ET Julian Date epoch values that look like this:
<P>
 
<PRE>
      2554617.231
</PRE>
   The SPICE's time conversion routine STR2ET will not be able to process
   these tags unless a modifier known to the SPICE system is added. You
   must indicate to STR2ET that these values are Julian Dates in ET (now
   called Barycentric Dynamical Time, abbreviated as TDB) using the
   following assignment:
<P>
 
<PRE>
      TIME_WRAPPER = '# JD TDB'
</PRE>
   As another example suppose the time strings are given in calendar format
   Pacific Standard Time and look like this:
<P>
 
<PRE>
      1999 MAR 10 14:31:22.376
</PRE>
   You must then use the TIME_WRAPPER assignment as follows:
<P>
 
<PRE>
      TIME_WRAPPER = '# PST'
</PRE>
   to add ``PST'' to each time string so that SPICE time parsing software
   inside MKSPK will properly interpret these time tags.
<P>
 
   You can also use this assignment to add missing information. Suppose
   your data look like this:
<P>
 
<PRE>
      MAR 10 14:31:22.376
</PRE>
   You should use the following TIME_WRAPPER assignment:
<P>
 
<PRE>
      TIME_WRAPPER = '1999 # UTC'
</PRE>
   This will prefix your data with '1999 ' and suffix your data with ' UTC'
   so the input to the time parsing software inside MKSPK will look like:
<P>
 
<PRE>
      1999 MAR 03 10:14:22.376 UTC
</PRE>
   A special value must be assigned to the TIME_WRAPPER keyword when input
   times are given as DP numbers representing ET seconds past J2000. Such
   time tags are not processed by STR2ET; instead, they are buffered
   directly as DP numbers. To process this kind of input times the
   TIME_WRAPPER keyword must be set as follows:
<P>
 
<PRE>
      TIME_WRAPPER = '# ETSECONDS'
</PRE>
<BR><BR>
<A NAME="Complete Examples"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H2> Complete Examples
</H2><HR ALIGN="LEFT" WIDTH=50% ><P><BR><BR>
   Examples in this section illustrate which ``keywords=value'' assignments
   must be specified in a MKSPK setup file for particular combinations of
   the input data type and format and output SPK type. Although most of the
   examples create an SPK file containing trajectory of the Jovian
   satellite AMALTHEA with respect to Jupiter, which is a not very likely
   application for this program, the guidelines for creating setup files
   demonstrated by these examples apply to the situation when an SPK file
   for a spacecraft needs to be made.
<P>
 
   If you cut and paste one of these examples to help construct your own
   setup file be sure to change all values that need to be updated for your
   particular situation.
<P>
 
<BR><BR>
<A NAME="Input Data Type STATES / Output SPK Type 05"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type STATES / Output SPK Type 05
</H3><P><BR><BR>
   The Type 05 SPK represents a continuous ephemeris using a discrete set
   of unevenly spaced states and a two body propagation method.
<P>
 
   The PCK file 'gravity.tpc' containing GM of the central body (Jupiter)
   is specified using the PCK_FILE keyword. Alternatively, Jupiter's GM can
   be specified using the CENTER_GM keyword. The GM value will be stored in
   the output SPK file together with the states. The IGNORE_FIRST_LINE
   keyword is used to skip the header (three lines) of the input file and
   the LINES_PER_RECORD keyword is used to specify that each record of the
   input file occupies two lines, which the program must know because the
   input data delimiter ' ' is one that can be used in a SPICE time string.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'STATES'
   OUTPUT_SPK_TYPE   = 5
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH X Y Z VX VY VZ'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   PCK_FILE          = 'gravity.tpc'
   SEGMENT_ID        = 'SPK_STATES_05'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, R,V
   -------
   1979 MAR 05 00:00:00
    -178932.619 -28063.045 -17448.755 4.733702 -23.495860 -11.041956
   1979 MAR 05 00:02:00
    -178337.419 -30878.143 -18771.071 5.186043 -23.421245 -10.996084
   1979 MAR 05 00:04:00
    -177688.033 -33683.859 -20087.682 5.636786 -23.339517 -10.946873
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type STATES / Output SPK Type 08"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type STATES / Output SPK Type 08
</H3><P><BR><BR>
   The Type 08 SPK represents a continuous ephemeris using a discrete set
   of evenly spaced states and a Lagrange interpolation method.
<P>
 
   The POLYNOM_DEGREE keyword is used to specify the polynomial degree that
   will be used to interpolate over discreet states stored in the output
   SPK file; this parameter is required for SPK Type 8. The
   IGNORE_FIRST_LINE keyword is used to skip the header (three lines) of
   the input file and the LINES_PER_RECORD keyword is used to specify that
   each record of the input file occupies two lines, which the program must
   know because the input data delimiter ' ' is one that can be used in a
   SPICE time string.
<P>
 
   To ensure the continuity of the interpolating polynomials over the time
   span covered by an SPK Type 08 segment the degree of the polynomial
   should be odd.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'STATES'
   OUTPUT_SPK_TYPE   = 8
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH X Y Z VX VY VZ'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   POLYNOM_DEGREE    = 9
   SEGMENT_ID        = 'SPK_STATES_08'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, R,V
   -------
   1979 MAR 05 00:00:00
    -178932.619 -28063.045 -17448.755 4.733702 -23.495860 -11.041956
   1979 MAR 05 00:02:00
    -178337.419 -30878.143 -18771.071 5.186043 -23.421245 -10.996084
   1979 MAR 05 00:04:00
    -177688.033 -33683.859 -20087.682 5.636786 -23.339517 -10.946873
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type STATES / Output SPK Type 09"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type STATES / Output SPK Type 09
</H3><P><BR><BR>
   The Type 09 SPK represents a continuous ephemeris using a discrete set
   of unevenly spaced states and a Lagrange interpolation method.
<P>
 
   The POLYNOM_DEGREE keyword is used to specify the polynomial degree that
   will be used to interpolate over discreet states stored in the output
   SPK file; this parameter is required for SPK Type 9. The
   IGNORE_FIRST_LINE keyword is used to skip the header (three lines) of
   the input file and the LINES_PER_RECORD keyword is used to specify that
   each record of the input file occupies two lines, which the program must
   know because the input data delimiter ' ' is one that can be used in a
   SPICE time string.
<P>
 
   To ensure the continuity of the interpolating polynomials over the time
   span covered by an SPK Type 09 segment the degree of the polynomial
   should be odd.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'STATES'
   OUTPUT_SPK_TYPE   = 9
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH X Y Z VX VY VZ'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   POLYNOM_DEGREE    = 9
   SEGMENT_ID        = 'SPK_STATES_09'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, R,V
   -------
   1979 MAR 05 00:00:00
    -178932.619 -28063.045 -17448.755 4.733702 -23.495860 -11.041956
   1979 MAR 05 00:02:00
    -178337.419 -30878.143 -18771.071 5.186043 -23.421245 -10.996084
   1979 MAR 05 00:04:00
    -177688.033 -33683.859 -20087.682 5.636786 -23.339517 -10.946873
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type STATES / Output SPK Type 12"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type STATES / Output SPK Type 12
</H3><P><BR><BR>
   The Type 12 SPK represents a continuous ephemeris using a discrete set
   of evenly spaced states and a sliding window Hermite interpolation
   method.
<P>
 
   The POLYNOM_DEGREE keyword is used to specify the polynomial degree that
   will be used to interpolate over discreet states stored in the output
   SPK file; this parameter is required for SPK Type 12 and its value must
   be an odd number. The IGNORE_FIRST_LINE keyword is used to skip the
   header (three lines) of the input file and the LINES_PER_RECORD keyword
   is used to specify that each record of the input file occupies two
   lines, which the program must know because the input data delimiter ' '
   is one that can be used in a SPICE time string.
<P>
 
   To ensure the continuity of the interpolating polynomials over the time
   span covered by an SPK Type 12 segment the degree of the polynomial
   should be equivalent to 3 mod 4 (3, 7, 11, etc.)
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'STATES'
   OUTPUT_SPK_TYPE   = 12
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'B.V.Semenov, NAIF/JPL'
   DATA_ORDER        = 'EPOCH X Y Z VX VY VZ'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   POLYNOM_DEGREE    = 7
   SEGMENT_ID        = 'SPK_STATES_12'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, R,V
   -------
   1979 MAR 05 00:00:00
    -178932.619 -28063.045 -17448.755 4.733702 -23.495860 -11.041956
   1979 MAR 05 00:02:00
    -178337.419 -30878.143 -18771.071 5.186043 -23.421245 -10.996084
   1979 MAR 05 00:04:00
    -177688.033 -33683.859 -20087.682 5.636786 -23.339517 -10.946873
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type STATES / Output SPK Type 13"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type STATES / Output SPK Type 13
</H3><P><BR><BR>
   The Type 13 SPK represents a continuous ephemeris using a discrete set
   of unevenly spaced states and a sliding window Hermite interpolation
   method.
<P>
 
   The POLYNOM_DEGREE keyword is used to specify the polynomial degree that
   will be used to interpolate over discreet states stored in the output
   SPK file; this parameter is required for SPK Type 13 and its value must
   be an odd number. The IGNORE_FIRST_LINE keyword is used to skip the
   header (three lines) of the input file and the LINES_PER_RECORD keyword
   is used to specify that each record of the input file occupies two
   lines, which the program must know because the input data delimiter ' '
   is one that can be used in a SPICE time string.
<P>
 
   To ensure the continuity of the interpolating polynomials over the time
   span covered by an SPK Type 13 segment the degree of the polynomial
   should be equivalent to 3 mod 4 (3, 7, 11, etc.)
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'STATES'
   OUTPUT_SPK_TYPE   = 13
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'B.V.Semenov, NAIF/JPL'
   DATA_ORDER        = 'EPOCH X Y Z VX VY VZ'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   POLYNOM_DEGREE    = 7
   SEGMENT_ID        = 'SPK_STATES_13'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, R,V
   -------
   1979 MAR 05 00:00:00
    -178932.619 -28063.045 -17448.755 4.733702 -23.495860 -11.041956
   1979 MAR 05 00:02:00
    -178337.419 -30878.143 -18771.071 5.186043 -23.421245 -10.996084
   1979 MAR 05 00:04:00
    -177688.033 -33683.859 -20087.682 5.636786 -23.339517 -10.946873
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type STATES / Output SPK Type 15"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type STATES / Output SPK Type 15
</H3><P><BR><BR>
   The Type 15 SPK represents a continuous ephemeris using a compact
   analytic model. The object is modeled as orbiting a central body under
   the influence of a central mass plus first order secular effects of the
   J2 term in harmonic expansion of the central body gravitational
   potential.
<P>
 
   The PCK file 'gravity.tpc' containing GM and J2 of the central body
   (Jupiter) is specified using the PCK_FILE keyword. Alternatively,
   Jupiter's GM and J2 can be specified using the CENTER_GM and CENTER_J2
   keywords. The CENTER_POLE_RA and CENTER_POLE_DEC keywords contain
   Jupiter's pole RA and DEC with respect to the reference frame specified
   in the REF_FRAME_NAME keyword -- in this case B1950. If these keywords
   wouldn't be present in the setup file the program would compute these
   values from data present in the PCK file 'pck00005.tpc' provided using
   the keyword PCK_FILE. The START_TIME and STOP_TIME keywords specifying
   the file coverage interval, and the PRECESSION_TYPE keyword specifying
   the type of precession due to J2 are required for the output SPK Type
   15. Also The IGNORE_FIRST_LINE keyword is used to skip the header (three
   lines) of the input file and the LINES_PER_RECORD keyword is used to
   specify that each record of the input file occupies two lines, which the
   program must know because the input data delimiter ' ' is one that can
   be used in a SPICE time string.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'STATES'
   OUTPUT_SPK_TYPE   = 15
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH X Y Z VX VY VZ'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   START_TIME        = '1979 MAR 05'
   STOP_TIME         = '1979 MAR 06'
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   PCK_FILE          = ('pck00005.tpc' 'gravity.tpc' )
   PRECESSION_TYPE   = 'NO PRECESSION'
   CENTER_POLE_RA    = 268.001
   CENTER_POLE_DEC   = 64.504
   SEGMENT_ID        = 'SPK_STATES_15'
   \begintext
</PRE>
   Though the input file in this example contains multiple records, only
   the first of them will used to create the output SPK file.
<P>
 
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, R,V
   -------
   1979 MAR 05 00:00:00
    -178932.619 -28063.045 -17448.755 4.733702 -23.495860 -11.041956
   1979 MAR 05 00:02:00
    -178337.419 -30878.143 -18771.071 5.186043 -23.421245 -10.996084
   1979 MAR 05 00:04:00
    -177688.033 -33683.859 -20087.682 5.636786 -23.339517 -10.946873
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type STATES / Output SPK Type 17"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type STATES / Output SPK Type 17
</H3><P><BR><BR>
   The SPK data Type 17 represents a continuous ephemeris using a compact
   analytic model. The object is following an elliptic orbit with
   precessing line of nodes and argument of periapse relative to the
   equatorial frame of some central body. The orbit is modeled via
   equinoctial elements.
<P>
 
   The PCK file 'gravity.tpc' containing GM of the central body (Jupiter)
   is specified using the PCK_FILE keyword. Alternatively, Jupiter's GM can
   be specified using the CENTER_GM keyword. The GM value is required to
   convert states from the input file to a set of equinoctial elements
   stored in the output SPK file. The CENTER_POLE_RA and CENTER_POLE_DEC
   keywords contain Jupiter's pole RA and DEC with respect to the reference
   frame specified in the REF_FRAME_NAME keyword -- in this case B1950. If
   these keywords wouldn't be present in the setup file the program would
   compute these values from data present in the PCK file 'pck00005.tpc'
   provided using the PCK_FILE keyword. The START_TIME and STOP_TIME
   keywords specifying file coverage interval are required for the output
   SPK Type 17. The IGNORE_FIRST_LINE keyword is used to the header (three
   lines) of the input file and the LINES_PER_RECORD keyword is used to
   specify that each record of the input file occupies three lines, which
   the program must know because the input data delimiter ' ' is one that
   can be used in a SPICE time string.
<P>
 
   Setup file (In this example the value of DATA_ORDER is line-wrapped due
   to document formatting restrictions; it must be contained on a single
   line in an actual MKSPK setup file):
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'STATES'
   OUTPUT_SPK_TYPE   = 17
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH X Y Z VX VY VZ DPER/DT
   DMPN/DT DNOD/DT'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   START_TIME        = '1979 MAR 05'
   STOP_TIME         = '1979 MAR 06'
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 3
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   PCK_FILE          = ('pck00005.tpc' 'gravity.tpc')
   CENTER_POLE_RA    = 268.001
   CENTER_POLE_DEC   = 64.504
   SEGMENT_ID        = 'SPK_STATES_17'
   \begintext
</PRE>
   Since only one state is needed to create an output SPK file of type 17,
   the input file in this example contains a just one record.
<P>
 
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, R,V, EQ_EL(7), EQ_EL(8), EQ_EL(9)
   ------------------------------------
   1979 MAR 05 00:00:00
    -178932.619 -28063.045 -17448.755 4.733702 -23.495860 -11.041956
    2.912548790268837E-05 8.363793086428307E-03 -2.898889191844143E-05
</PRE>
<BR><BR>
<A NAME="Input Data Type ELEMENTS / Output SPK Type 05"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type ELEMENTS / Output SPK Type 05
</H3><P><BR><BR>
   The PCK file 'gravity.tpc' containing GM of the central body (Jupiter)
   is specified using the PCK_FILE keyword. Alternatively, Jupiter's GM can
   be specified using the CENTER_GM keyword. The GM is needed to convert
   elements to states and it is also contained in the output SPK file. The
   IGNORE_FIRST_LINE keyword is used to skip the header (three lines) of
   the of the input file and the LINES_PER_RECORD keyword is used to
   specify that each record of the input file occupies two lines, which the
   program must know because the input data delimiter ' ' is one that can
   be used in a SPICE time string.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'ELEMENTS'
   OUTPUT_SPK_TYPE   = 5
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH RP E INC NOD PER MEAN SKIP'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   PCK_FILE          = 'gravity.tpc'
   SEGMENT_ID        = 'SPK_ELEMENTS_05'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, RP, ECC, INC, LNODE, ARGP, M0, T0
   -------------------------------------
   1979 MAR 05 00:00:00
    181803.245 0.001067 25.415 357.216 114.445 78.346 -657287949.8
   1979 MAR 05 00:02:00
    181814.040 0.001008 25.415 357.216 115.117 78.678 -657287829.8
   1979 MAR 05 00:04:00
    181824.846 0.000949 25.415 357.216 115.809 78.990 -657287709.8
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type ELEMENTS / Output SPK Type 08"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type ELEMENTS / Output SPK Type 08
</H3><P><BR><BR>
   The PCK file 'gravity.tpc' containing GM of the central body (Jupiter)
   is specified using the PCK_FILE keyword. Alternatively, Jupiter's GM can
   be specified using the CENTER_GM keyword. The GM is needed to convert
   elements to states. The POLYNOM_DEGREE keyword is used to specify the
   polynomial degree that will be used to interpolate over discreet states
   stored in the output SPK file; this parameter is required for SPK Type
   8. The IGNORE_FIRST_LINE keyword is used to skip the header (three
   lines) of the input file and the LINES_PER_RECORD keyword is used to
   specify that each record of the input file occupies three lines, which
   the program must know because the input data delimiter ' ' is one that
   can be used in a SPICE time string.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'ELEMENTS'
   OUTPUT_SPK_TYPE   = 8
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH RP E INC NOD PER MEAN SKIP'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   POLYNOM_DEGREE    = 8
   PCK_FILE          = 'gravity.tpc'
   SEGMENT_ID        = 'SPK_ELEMENTS_08'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, RP, ECC, INC, LNODE, ARGP, M0, T0
   -------------------------------------
   1979 MAR 05 00:00:00
    181803.245 0.001067 25.415 357.216 114.445 78.346 -657287949.8
   1979 MAR 05 00:02:00
    181814.040 0.001008 25.415 357.216 115.117 78.678 -657287829.8
   1979 MAR 05 00:04:00
    181824.846 0.000949 25.415 357.216 115.809 78.990 -657287709.8
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type ELEMENTS / Output SPK Type 09"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type ELEMENTS / Output SPK Type 09
</H3><P><BR><BR>
   The PCK file 'gravity.tpc' containing GM of the central body (Jupiter)
   is specified using the PCK_FILE keyword. Alternatively, Jupiter's GM can
   be specified using the CENTER_GM keyword. The GM is needed to convert
   elements to states. The POLYNOM_DEGREE keyword is used to specify the
   polynomial degree that will be used to interpolate over discreet states
   stored in the output SPK file; this parameter is required for SPK Type
   9. The IGNORE_FIRST_LINE keyword is used to skip the header (three
   lines) of the input file and the LINES_PER_RECORD keyword is used to
   specify that each record of the input file occupies three lines, which
   the program must know because the input data delimiter ' ' is one that
   can be used in a SPICE time string.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'ELEMENTS'
   OUTPUT_SPK_TYPE   = 9
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH RP E INC NOD PER MEAN SKIP'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   POLYNOM_DEGREE    = 8
   PCK_FILE          = 'gravity.tpc'
   SEGMENT_ID        = 'SPK_ELEMENTS_09'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, RP, ECC, INC, LNODE, ARGP, M0, T0
   -------------------------------------
   1979 MAR 05 00:00:00
    181803.245 0.001067 25.415 357.216 114.445 78.346 -657287949.8
   1979 MAR 05 00:02:00
    181814.040 0.001008 25.415 357.216 115.117 78.678 -657287829.8
   1979 MAR 05 00:04:00
    181824.846 0.000949 25.415 357.216 115.809 78.990 -657287709.8
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type ELEMENTS / Output SPK Type 12"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type ELEMENTS / Output SPK Type 12
</H3><P><BR><BR>
   The PCK file 'gravity.tpc' containing GM of the central body (Jupiter)
   is specified using the PCK_FILE keyword. Alternatively, Jupiter's GM can
   be specified using the CENTER_GM keyword. The GM is needed to convert
   elements to states. The POLYNOM_DEGREE keyword is used to specify the
   polynomial degree that will be used to interpolate over discreet states
   stored in the output SPK file; this parameter is required for SPK Type
   12 and its value must be an odd number. The IGNORE_FIRST_LINE keyword is
   used to skip the header (three lines) of the input file and the
   LINES_PER_RECORD keyword is used to specify that each record of the
   input file occupies three lines, which the program must know because the
   input data delimiter ' ' is one that can be used in a SPICE time string.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'ELEMENTS'
   OUTPUT_SPK_TYPE   = 12
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'B.V.Semenov, NAIF/JPL'
   DATA_ORDER        = 'EPOCH RP E INC NOD PER MEAN SKIP'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   POLYNOM_DEGREE    = 7
   PCK_FILE          = 'gravity.tpc'
   SEGMENT_ID        = 'SPK_ELEMENTS_12'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, RP, ECC, INC, LNODE, ARGP, M0, T0
   -------------------------------------
   1979 MAR 05 00:00:00
    181803.245 0.001067 25.415 357.216 114.445 78.346 -657287949.8
   1979 MAR 05 00:02:00
    181814.040 0.001008 25.415 357.216 115.117 78.678 -657287829.8
   1979 MAR 05 00:04:00
    181824.846 0.000949 25.415 357.216 115.809 78.990 -657287709.8
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type ELEMENTS / Output SPK Type 13"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type ELEMENTS / Output SPK Type 13
</H3><P><BR><BR>
   The PCK file 'gravity.tpc' containing GM of the central body (Jupiter)
   is specified using the PCK_FILE keyword. Alternatively, Jupiter's GM can
   be specified using the CENTER_GM keyword. The GM is needed to convert
   elements to states. The POLYNOM_DEGREE keyword is used to specify the
   polynomial degree that will be used to interpolate over discreet states
   stored in the output SPK file; this parameter is required for SPK Type
   13 and its value must be an odd number. The IGNORE_FIRST_LINE keyword is
   used to skip the header (three lines) of the input file and the
   LINES_PER_RECORD keyword is used to specify that each record of the
   input file occupies three lines, which the program must know because the
   input data delimiter ' ' is one that can be used in a SPICE time string.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'ELEMENTS'
   OUTPUT_SPK_TYPE   = 13
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH RP E INC NOD PER MEAN SKIP'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   POLYNOM_DEGREE    = 7
   PCK_FILE          = 'gravity.tpc'
   SEGMENT_ID        = 'SPK_ELEMENTS_13'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, RP, ECC, INC, LNODE, ARGP, M0, T0
   -------------------------------------
   1979 MAR 05 00:00:00
    181803.245 0.001067 25.415 357.216 114.445 78.346 -657287949.8
   1979 MAR 05 00:02:00
    181814.040 0.001008 25.415 357.216 115.117 78.678 -657287829.8
   1979 MAR 05 00:04:00
    181824.846 0.000949 25.415 357.216 115.809 78.990 -657287709.8
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type ELEMENTS / Output SPK Type 15"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type ELEMENTS / Output SPK Type 15
</H3><P><BR><BR>
   The PCK file 'gravity.tpc' containing GM and J2 of the central body
   (Jupiter) is specified using the PCK_FILE keyword. Alternatively,
   Jupiter's GM and J2 can be specified using the CENTER_GM and CENTER_J2
   keywords. The CENTER_POLE_RA and CENTER_POLE_DEC keywords contain
   Jupiter's pole RA and DEC with respect to the reference frame specified
   in the REF_FRAME_NAME keyword -- in this case B1950. If these keywords
   wouldn't be present in the setup file, the program would compute these
   value from data present in the PCK file 'pck00005.tpc' provided using
   the keyword PCK_FILE. The START_TIME and STOP_TIME keywords specifying
   the file coverage interval and the PRECESSION_TYPE keyword specifying
   the type of precession due to J2 are required for the output SPK Type
   15. The IGNORE_FIRST_LINE keyword is used to skip the header (three
   lines) of the input file and the LINES_PER_RECORD keyword is used to
   specify that each record of the input file occupies two lines, which the
   program must know because the input data delimiter ' ' is one that can
   be used in a SPICE time string.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'ELEMENTS'
   OUTPUT_SPK_TYPE   = 15
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH RP E INC NOD PER MEAN SKIP'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   START_TIME        = '1979 MAR 05'
   STOP_TIME         = '1979 MAR 06'
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   PCK_FILE          = ('pck00005.tpc' 'gravity.tpc' )
   PRECESSION_TYPE   = 'NO PRECESSION'
   CENTER_POLE_RA    = 268.001
   CENTER_POLE_DEC   = 64.504
   SEGMENT_ID        = 'SPK_ELEMENTS_15'
   \begintext
</PRE>
   Though the input file in this example contains multiple records, only
   the first of them will used to create the output SPK file.
<P>
 
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, RP, ECC, INC, LNODE, ARGP, M0, T0
   -------------------------------------
   1979 MAR 05 00:00:00
    181803.245 0.001067 25.415 357.216 114.445 78.346 -657287949.8
   1979 MAR 05 00:02:00
    181814.040 0.001008 25.415 357.216 115.117 78.678 -657287829.8
   1979 MAR 05 00:04:00
    181824.846 0.000949 25.415 357.216 115.809 78.990 -657287709.8
   ...
</PRE>
<BR><BR>
<A NAME="Input Data Type ELEMENTS / Output SPK Type 17"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type ELEMENTS / Output SPK Type 17
</H3><P><BR><BR>
   The PCK file 'gravity.tpc' containing GM of the central body (Jupiter)
   is specified using the PCK_FILE keyword. Alternatively, Jupiter's GM can
   be specified using the CENTER_GM keyword. The GM value is required to
   convert elements from the input file to a set of equinoctial elements
   stored in the output SPK file. The CENTER_POLE_RA and CENTER_POLE_DEC
   keywords contain Jupiter's pole RA and DEC with respect to the reference
   frame specified in the REF_FRAME_NAME keyword -- in this case B1950. If
   these keywords wouldn't be present in the setup file, the program would
   compute these values from data present in the PCK file 'pck00005.tpc'
   provided using the keyword PCK_FILE. The START_TIME and STOP_TIME
   keywords specifying the file coverage interval are required for the
   output SPK Type 17. The IGNORE_FIRST_LINE keyword is used to the header
   of the input file and the LINES_PER_RECORD keyword is used to specify
   that each record of the input file occupies three lines, which the
   program must know because the input data delimiter ' ' is one that can
   be used in a SPICE time string.
<P>
 
   Setup file (In this example the value for DATA_ORDER is wrapped due to
   document formatting; it must be on a single line in the actual setup
   file):
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'ELEMENTS'
   OUTPUT_SPK_TYPE   = 17
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH RP E INC NOD PER MEAN SKIP
   DPER/DT DMPN/DT DNOD/DT'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   START_TIME        = '1979 MAR 05'
   STOP_TIME         = '1979 MAR 06'
   DATA_DELIMITER    = ' '
   LINES_PER_RECORD  = 3
   IGNORE_FIRST_LINE = 3
   LEAPSECONDS_FILE  = 'naif0007.tls'
   PCK_FILE          = ('pck00005.tpc' 'gravity.tpc' )
   CENTER_POLE_RA    = 268.001
   CENTER_POLE_DEC   = 64.504
   SEGMENT_ID        = 'SPK_ELEMENTS_17'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   Test: 505 relative to 599 in frame B1950. GM= 126686536.75178
   JD, RP, ECC, INC, LNODE, ARGP, M0, T0, EQ_EL(7), EQ_EL(8), EQ_EL(9)
   ------------------------------------------------------------------
   1979 MAR 05 00:00:00
    181803.245 0.001067 25.415 357.216 114.445 78.346 -657287949.8
    2.912548790268837E-05 8.363793086428307E-03 -2.898889191844143E-05
</PRE>
<BR><BR>
<A NAME="Input Data Type EQ_ELEMENTS / Output SPK Type 17"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type EQ_ELEMENTS / Output SPK Type 17
</H3><P><BR><BR>
   The CENTER_POLE_RA and CENTER_POLE_DEC keywords contain Jupiter's pole
   RA and DEC with respect to the reference frame specified in the
   REF_FRAME_NAME keyword -- in this case B1950. If these keywords wouldn't
   be present in the setup file, the program would compute these values
   from data present in the PCK file 'pck00005.tpc' that will have to be
   provided using the keyword PCK_FILE. The START_TIME and STOP_TIME
   keywords specifying the file coverage interval are required for the
   output SPK Type 17. The IGNORE_FIRST_LINE keyword is used to skip the
   header (six lines) of the input file and the LINES_PER_RECORD keyword is
   used to specify that each record of the input file occupies ten lines,
   which the program must know because the input data delimiter ' ' is one
   that can be used in a SPICE time string.
<P>
 
   Setup file (In this example the value of DATA_ORDER is wrapped due to
   document formatting; it must be on a single line in actual setup file):
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'EQ_ELEMENTS'
   OUTPUT_SPK_TYPE   = 17
   OBJECT_ID         = 505
   OBJECT_NAME       = 'AMALTHEA'
   CENTER_ID         = 599
   CENTER_NAME       = 'JUPITER'
   REF_FRAME_NAME    = 'B1950'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'EPOCH EQ_A EQ_H EQ_K EQ_ML EQ_P
   EQ_Q DPER/DT DMPN/DT DNOD/DT'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   START_TIME        = '1979 MAR 05'
   STOP_TIME         = '1979 MAR 06'
   DATA_DELIMITER    = ','
   IGNORE_FIRST_LINE = 6
   LINES_PER_RECORD  = 10
   LEAPSECONDS_FILE  = 'naif0007.tls'
   TIME_WRAPPER      = '# JD'
   CENTER_POLE_RA    = 268.001
   CENTER_POLE_DEC   = 64.504
   SEGMENT_ID        = 'SPK_EQ_ELEMENTS_17'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
     LABEL = 'Astrometric and Voyager data solution - JUP101',
     RCKEQX        =   2.433282500000000E+06,
     RCKNAM(01)    = 'AMALTH',
     RCKNUM(01)    = 505,
     RCKCTR(01)    = 'JUPITE',
     RCKTYP(01)    = 'EQUIN ',
       2443937.5,
       1.813655610000000E+05,
       1.713267736805066E-03,
       2.975197760058551E-03,
       1.920818611670669E+02,
      -2.939839894519083E-03,
      -7.170730998150093E-04,
       2.912548790268837E-05,
       8.363793086428307E-03,
      -2.898889191844143E-05,
</PRE>
<BR><BR>
<A NAME="Input Data Type TL_ELEMENTS / Output SPK Type 10"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Input Data Type TL_ELEMENTS / Output SPK Type 10
</H3><P><BR><BR>
   The OBJECT_ID keyword contains NORAD spacecraft ID for the Mir Space
   Station; this ID is used to locate data in the input two-line elements
   file. The CENTER_ID and REF_FRAME_NAME contain required values of 399
   and 'J2000' correspondingly. The PCK_FILE keyword contains the name of
   an Earth geophysical constants PCK file; a copy of such file is usually
   provided with the SPICE toolkit under the ``/data'' directory. Note that
   no keywords describing input data format are present in the setup file.
   These keywords are not needed for 'TL_ELEMENTS'/SPK 10 program runs
   because two-line elements files have fixed format and are processed by
   the program as a special case. Also note that the output SPK coverage
   start and stop times are automatically set to be 12 hours before the
   time of the first input two-line elements set and 12 hours after the
   time of the last input two-line elements set correspondingly.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'TL_ELEMENTS'
   OUTPUT_SPK_TYPE   = 10
   OBJECT_ID         = 16609
   CENTER_ID         = 399
   REF_FRAME_NAME    = 'J2000'
   LEAPSECONDS_FILE  = 'naif0007.tls'
   INPUT_DATA_FILE   = 'mir.tle'
   OUTPUT_SPK_FILE   = 'mir.bsp'
   PCK_FILE          = 'geophysical.ker'
   SEGMENT_ID        = 'SPACE STATION MIR'
   PRODUCER_ID       = 'Boris Semenov, NAIF/JPL'
   \begintext
</PRE>
   Input data file (the first two characters on each line of the sample
   two-line elements record -- '1 ' for the line '16609U 86017A 97 ...' and
   '2 ' for the line '16609 51.6542 51...' -- were taken out to fit the
   sample record into the page):
<P>
 
<PRE>
   Mir
   16609U 86017A   97175.09681976  .00000769  00000-0  15893-4 0  3939
   16609  51.6542  51.1598 0005239 178.2438 181.8517 15.59510867648105
</PRE>
<BR><BR>
<A NAME="Skipping Input Data Record Tokens"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Skipping Input Data Record Tokens
</H3><P><BR><BR>
   The next example demonstrates how ``SKIP'' can be used in the definition
   of the input record contents specified using the DATA_ORDER keyword. In
   this example ``SKIP'' is used to ignore zero-length tokens present in
   the input data records. The IGNORE_FIRST_LINE keyword is used to skip
   one line of the header information.
<P>
 
   Setup file:
<P>
 
<PRE>
   \begindata
   INPUT_DATA_FILE   = 'good_inputs/states:commas'
   OUTPUT_SPK_FILE   = 'good_outputs/states_commas.bsp'
   INPUT_DATA_TYPE   = 'STATES'
   OUTPUT_SPK_TYPE   = 5
   OBJECT_ID         = -557
   OBJECT_NAME       = 'GRANAT'
   CENTER_ID         = 399
   CENTER_NAME       = 'EARTH'
   REF_FRAME_NAME    = 'J2000'
   PRODUCER_ID       = 'B.V. Semenov'
   DATA_ORDER        = 'X Y Z VX VY VZ SKIP SKIP EPOCH SKIP'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   DATA_DELIMITER    = ','
   LINES_PER_RECORD  = 2
   IGNORE_FIRST_LINE = 1
   LEAPSECONDS_FILE  = 'naif0007.tls'
   PCK_FILE          = ('pck00005.tpc' 'gravity.tpc')
   SEGMENT_ID        = 'TEST'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   X,Y,Z,VX,VY,VZ,,,Epoch,,
   -79376.312,94802.228,152149.381,-.537457,.057167,.299857,
   ,,1990-01-01 00:00:00.000,,
   -111902.474,71404.027,136526.217,.031594,-.434385,-.559425,
   ,,1990-01-02 09:02:02.774,,
   -70048.213,14411.561,47294.006,1.324262,-.933652,-1.728348,
   ,,1990-01-03 09:23:15.101,,
   ...
</PRE>
<BR><BR>
<A NAME="Two Epochs in the Input Data Records"></A>
<p align="right"><a href="#top"><small>Top</small></a></p>
<H3> Two Epochs in the Input Data Records
</H3><P><BR><BR>
   The next example demonstrates use of the EPOCH_STR_LENGTH keyword in
   cases where two epoch strings -- epoch, and epoch of periapsis --
   provided in input records have to be used to compute data for the output
   SPK file. The IGNORE_FIRST_LINE keyword is used to skip one line of the
   header information.
<P>
 
   Setup file (in this example the value of DATA_ORDER is wrapped due to
   document formatting; it must be on a single line in the actual setup
   file):
<P>
 
<PRE>
   \begindata
   INPUT_DATA_TYPE   = 'ELEMENTS'
   OUTPUT_SPK_TYPE   = 5
   OBJECT_ID         = -557
   OBJECT_NAME       = 'GRANAT'
   CENTER_ID         = 399
   CENTER_NAME       = 'EARTH'
   REF_FRAME_NAME    = 'J2000'
   PRODUCER_ID       = 'N.G.Khavenson, IKI RAS, Russia'
   DATA_ORDER        = 'SKIP EPOCH E RP INC NOD PER EPOCHP
   SKIP SKIP SKIP SKIP SKIP SKIP'
   INPUT_DATA_UNITS  = ('ANGLES=DEGREES' 'DISTANCES=km')
   START_TIME        = '1998 JAN 01'
   STOP_TIME         = '1999 JAN 01'
   DATA_DELIMITER    = ','
   TIME_WRAPPER      = '# TDB'
   EPOCH_STR_LENGTH  = 30
   IGNORE_FIRST_LINE = 1
   LEAPSECONDS_FILE  = 'naif0007.tls'
   PCK_FILE          = ('pck00005.tpc' 'gravity.tpc')
   SEGMENT_ID        = 'TEST'
   \begintext
</PRE>
   Input data file:
<P>
 
<PRE>
   JDTDB, T, e, q, i, LAN, APF, ToP, n, MA, TA, a, AD, PER
   2450819.000000000, A.D. 1998-Jan-05 12:00:00.0000,
   0.9998547684834859E+00, 0.3450736825384300E+08,
   0.1249344272957001E+03, 0.1880167631634887E+03,
   0.1301649235108716E+03,A.D. 1998-JUL-05 12:00:00.0000,
   0.1802195911346396E-09, 0.9563896596356295E-02,
   0.1601180118692756E+03, 0.2376024783190921E+12,
   0.4751704492699304E+12, 0.1997563071436828E+13,
</PRE>

</TD>
</TR>
</TBODY>
</TABLE>

</BODY>

</HTML>
